package ui.components.core;

import java.awt.Font;
import java.awt.Graphics;

import javax.swing.DebugGraphics;

import ui.pfont.PFont;
import ui.pfont.PFontLibrary;


public class CGraphics
{
    public CGraphics(Graphics g) {
        this.graphics = g;
        this.pcf = null;
    }
    
    public void setFont(int pcf_font, int pcf_size) {
        this.pcf = PFontLibrary.getFont(pcf_font, pcf_size);
    }
        
    public void setFont(Font f) {
        this.graphics.setFont(f);
    }
    
    public void drawString(String s, int x, int y) {       
        if (this.pcf != null) { 
            this.pcf.drawString(this.graphics, s, x, y);
        }
    }
    
    // enums for pcf font families derived from the pcf library:
    public static int TERMINUS  = PFontLibrary.TERMINUS;
    public static int MISCFIXED = PFontLibrary.MISCFIXED;
    
    public Graphics   graphics;
    public PFont      pcf;

}
